package com.sd.coupon.model.res;

import java.util.List;

import com.sd.coupon.entity.CategoryGoods;
import lombok.Data;

@Data
public class CategoryRes {

	private String name; //类目名称
	
	private String pic; //图片地址
	
	private Long id; //类目id
	
	private Integer sort; //排序
	
	private Long pid; // 父id

	private Boolean status; //是否展示

	private List<CategoryRes> children; //二级目录

	public CategoryRes(CategoryGoods cate){
		name = cate.getCategoryName();
		id = cate.getId();
		pid = cate.getPid();
		status = cate.getStatus();
		sort = cate.getSort();
		pic = cate.getDescription();
	}

}
